package com.baomidou.springboot.mapper;

import com.baomidou.mybatisplus.mapper.BaseMapper;
import com.baomidou.mybatisplus.plugins.Page;
import com.baomidou.springboot.entity.News;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 * 关于我们 Mapper 接口
 * </p>
 *
 * @author QQQ
 * @since 2018-06-19
 */
public interface NewsMapper extends BaseMapper<News> {

    List<News> findByDateDesc(Page<News> page, @Param("search") String search);

    List<News> findBySort(@Param("sort") String sort);

    List<News> findByLimit(Integer limit);

    List<News> findByMenuAndLimit(@Param("menu") String menu, @Param("limit") Integer limit);

    List<News> findPage(Page<News> page, String menu);

}
